package testApplets;

import processing.core.PApplet;
import simpleGeom.BasicMesh;
import simpleGeom.Box3D;
import simpleGeom.HasPos3D;
import simpleGeom.TrianglePreCalc;
import simpleGeom.Vec3D;

public class TriTest extends PApplet{
public void setup(){
	HasPos3D p0=new Vec3D(10,0,77.206f);
	HasPos3D p1= new Vec3D(0,0,77.206f);
	HasPos3D p2= new Vec3D(3,10,77.20600f);
	TrianglePreCalc tri=new TrianglePreCalc(p0,p1,p2);
	HasPos3D pTest=new Vec3D(3f, 0.5f, 77.206f);
	println("dist: "+tri.getDistance(pTest.getX(),pTest.getY(),pTest.getZ()));
	float d=tri.getDistancePlane(pTest.getX(),pTest.getY(),pTest.getZ());
	println("cDist: "+d);
	println(tri.getBounds3D().getOffsetBox(1));
	/*BasicMesh mesh=new BasicMesh();
	mesh.load(this.selectInput());
	println(mesh.getBounds3D());
	Box3D clipBox=new Box3D(0.20f,0.4f,-0.85f,0.3f,0.5f,-0.75f);
	mesh.removeOuterFaces(clipBox);
	mesh.saveObj(this.selectOutput());*/
}
public void draw(){
	
}

}
